package com.sinosoft.emplmis.application.web.dto;

import com.sinosoft.framework.core.api.domain.ResourceEntity;
import com.sinosoft.framework.core.common.utils.ObjectUtil;

/**
 * 资源数据传输对象
 * @author xiaoxiong
 *
 */
public class ResourceData implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	
	private Integer id;
	
	private Integer pid;
	
	private String name;
	
	private String type;
	
	private Integer sort;
	
	private String url;
	
	private String permCode;
	
	private String icon;
	
	private String state;
	
	private String description;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getPid() {
		return pid;
	}

	public void setPid(Integer pid) {
		this.pid = pid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getPermCode() {
		return permCode;
	}

	public void setPermCode(String permCode) {
		this.permCode = permCode;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	
	/**
	 * 数据转换
	 * @param resourceData
	 * @param resourceEntity
	 */
	public void toResourceData(ResourceData resourceData, ResourceEntity resourceEntity) {
		try {
			ObjectUtil.oldToNew(resourceData, resourceEntity, "serialVersionUID");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
